Existing tools (e.g., SPICE) for simulating integrated circuits are not equipped to simulate magnetic memory and spin logic elements. The deficiencies of existing tools are caused, for example, due to the vectorial nature of spin current and spin voltages. Furthermore, simulating magnetic memory and spin logic elements with traditional circuits (e.g., CMOS based circuits) together is not possible by existing SPICE-like circuit simulation tools.